const SkeletonWebpackPlugin = require('vue-skeleton-webpack-plugin');
const path = require('path')
module.exports = {
    publicPath:'./',
    devServer: {
        proxy: {
            '/api':{
                target: 'http://192.168.0.3:8123',
                // target: 'http://192.168.3.20:8154/',
                changeOrigin: true,
                pathRewrite: {
                '^/api': '/api'
                }
            },
        },
        disableHostCheck: true
    },

    chainWebpack: config => {
        // 其他配置
        config.entry('main').add('babel-polyfill') // main是入口js文件
        // 其他配置
    },
     css: {
         extract: true, // css拆分ExtractTextPlugin插件，默认true - 骨架屏需要为true
     },
    lintOnSave: false,
    configureWebpack: (config) => {
        // vue骨架屏插件配置
        config.plugins.push(new SkeletonWebpackPlugin({
            webpackConfig: {
                entry: {
                    app: path.join(__dirname, './src/components/entry-skeleton.js'),
                },
            },
            minimize: true,
            quiet: true,
        }))
    },
};
